package com.nageoffer.shortlink.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nageoffer.shortlink.admin.dao.entity.UserDO;
import com.nageoffer.shortlink.admin.dto.req.UserLoginReqDTO;
import com.nageoffer.shortlink.admin.dto.req.UserRegisterReqDTO;
import com.nageoffer.shortlink.admin.dto.req.UserUpdateReqDTO;
import com.nageoffer.shortlink.admin.dto.resp.UserLoginRespDTO;
import com.nageoffer.shortlink.admin.dto.resp.UserRespDTO;

/**
 * ClassName: UserService
 * Description:
 *
 * @Author Dong
 * @Create 2024/11/11 12:20
 * @Version 1.0
 */
public interface UserService extends IService<UserDO> {
    /*
     * 根据用户名查询用户信息
     */
    UserRespDTO getUserByUsername(String username);

    /*
     * 查询用户是否存在
     */
    Boolean hasUsername(String username);

    /*
     * 注册用户
     */
    void register(UserRegisterReqDTO requestParam);

    /*
     * 根据用户名修改用户
     */
    void update(UserUpdateReqDTO requestParam);
    /*
    用户登录
     */
    UserLoginRespDTO login(UserLoginReqDTO requestParam);
    /*
    检查用户是否登录
     */
    Boolean checkLogin(String username,String token);
    /*
    用户退出功能
     */
    void logout(String username, String token);
}
